package tech.aistar.service.demand.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Picture;
import tech.aistar.mapper.deamnd.PictureMapper;
import tech.aistar.service.demand.IPictureService;

import java.util.List;

/**
 * Created by 豆梦寒 on 2019/9/27.
 */
@Service
public class PictureServiceImpl implements IPictureService {
    @Autowired
    private PictureMapper pictureMapper;

    @Override
    public Picture findPathById(Integer id) {
        Picture picture = pictureMapper.findPathById(id);
        return picture;
    }

    @Override
    public void delPathById(Integer id) {
        pictureMapper.delPathById(id);
    }

    @Override
    public void addPathById(Picture picture) {
        pictureMapper.addPathById(picture);
    }

    @Override
    public void updatepicture(Picture picture) {
        pictureMapper.updatepicture(picture);
    }

    @Override
    public List<Picture> findById() {
        List<Picture> list = pictureMapper.findById();
        return list;
    }

    @Override
    public Picture updateOne(Picture picture) {
        pictureMapper.updateOne(picture);
        return picture;
    }
}
